package com.logos.ruralrevitalization.service;

import com.logos.ruralrevitalization.entity.AgriculturalProduct;
import com.logos.ruralrevitalization.req.AgriculturalProductReq;
import com.logos.ruralrevitalization.resp.AgriculturalProductResp;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 农产品表(AgriculturalProduct)表服务接口
 *
 * @author rose
 * @since 2025-03-25 12:27:49
 */
public interface AgriculturalProductService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    AgriculturalProductResp queryById(Long id);

    /**
     * 新增数据
     *
     * @param agriculturalProduct 实例对象
     * @return 实例对象
     */
    AgriculturalProduct insert(AgriculturalProduct agriculturalProduct);

    /**
     * 修改数据
     *
     * @param agriculturalProduct 实例对象
     * @return 实例对象
     */
    AgriculturalProduct update(AgriculturalProduct agriculturalProduct);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Long id);

    List<AgriculturalProductResp> queryByProductType(AgriculturalProductReq agriculturalProductReq);

    List<AgriculturalProductResp> queryHotSales();

    List<AgriculturalProductResp> search(AgriculturalProductReq agriculturalProductReq);

    List<AgriculturalProductResp> queryRuralProd(Long userId);

    Boolean add(AgriculturalProductReq agriculturalProductReq);

    Boolean down(AgriculturalProductReq agriculturalProductReq);

    Boolean updateInfo(AgriculturalProductReq agriculturalProductReq);

    List<AgriculturalProductResp> showHome();
}
